// @ts-nocheck
import React from 'react';
import { ApplyPluginsType } from 'D:/1806A/day06/node_modules/umi/node_modules/@umijs/runtime';
import * as umiExports from './umiExports';
import { plugin } from './plugin';

export function getRoutes() {
  const routes = [
  {
    "exact": true,
    "path": "/",
    "redirect": "/main"
  },
  {
    "path": "/main",
    "component": require('@/pages/Main/index').default,
    "routes": [
      {
        "path": "/main/classManger",
        "component": require('@/pages/main/class/classManger').default,
        "exact": true,
        "meta": {
          "type": "class"
        }
      },
      {
        "path": "/main/roomManger",
        "component": require('@/pages/main/class/roomManger').default,
        "exact": true,
        "meta": {
          "type": "class"
        }
      },
      {
        "path": "/main/studentManger",
        "component": require('@/pages/main/class/studentManger').default,
        "exact": true,
        "meta": {
          "type": "class"
        }
      },
      {
        "path": "/main/addExam",
        "component": require('@/pages/main/exam/addExam').default,
        "exact": true,
        "meta": {
          "type": "exam"
        }
      },
      {
        "path": "/main/testPaper",
        "component": require('@/pages/main/exam/testPaper').default,
        "exact": true,
        "meta": {
          "type": "exam"
        }
      },
      {
        "path": "/main/addQuestion",
        "component": require('@/pages/main/questions/addQuestion').default,
        "exact": true,
        "meta": {
          "type": "questions"
        }
      },
      {
        "path": "/main/questionClassify",
        "component": require('@/pages/main/questions/questionClassify').default,
        "exact": true,
        "meta": {
          "type": "questions"
        }
      },
      {
        "path": "/main/showQuestion",
        "component": require('@/pages/main/questions/showQuestion').default,
        "exact": true,
        "meta": {
          "type": "questions"
        }
      },
      {
        "path": "/main/questionsDetail",
        "component": require('@/pages/main/questions/questionsDetail').default,
        "exact": true,
        "meta": {
          "type": "questions"
        }
      },
      {
        "path": "/main/addUser",
        "component": require('@/pages/main/users/addUser').default,
        "exact": true,
        "meta": {
          "type": "user"
        }
      },
      {
        "path": "/main/userList",
        "component": require('@/pages/main/users/userList').default,
        "exact": true,
        "meta": {
          "type": "user"
        }
      },
      {
        "path": "/main",
        "redirect": "/main/addQuestion",
        "exact": true
      },
      {
        "path": "/main/*",
        "component": require('@/pages/404').default,
        "exact": true
      }
    ]
  },
  {
    "path": "/login",
    "component": require('@/pages/login').default,
    "exact": true
  },
  {
    "path": "/*",
    "component": require('@/pages/404').default,
    "exact": true
  }
];

  // allow user to extend routes
  plugin.applyPlugins({
    key: 'patchRoutes',
    type: ApplyPluginsType.event,
    args: { routes },
  });

  return routes;
}
